﻿<Page x:Class="ScoreMS.Views.Examination_paperView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="618"
	Title="Examination_paperView">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="72" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="您的试卷列表" TextAlignment="Center" FontSize="24" Margin="0,26,0,0"></TextBlock>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="48" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal">
                <TextBlock Text="选择课程" FontSize="18" Height="23" Margin="200, 0, 0, 0" VerticalAlignment="Center" Name="textBlock3" />
                <ComboBox Height="23" Margin="20, 0, 0, 0" VerticalAlignment="Center" Name="cbxCourse" MinWidth="120" SelectionChanged="cbxCourse_SelectionChanged">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding course_id}"></TextBlock>
                                <TextBlock Margin="3, 0, 0, 0" Text="{Binding course_name}"></TextBlock>
                            </StackPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
            </StackPanel>
            <DataGrid Grid.Row="1" AutoGenerateColumns="False" HorizontalAlignment="Left" Name="dataGrid1" VerticalAlignment="Top"
                      Hyperlink.Click="DataGridHyperlinkColumn_Click"
                      IsReadOnly="True">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="试卷编号" Width="*" Binding="{Binding ex_id}"/>
                    <DataGridTextColumn Header="课程编号" Width="*" Binding="{Binding course_id}"/>
                    <DataGridTextColumn Header="大题数" Width="*" Binding="{Binding bigquestion_count}"/>
                    <DataGridTextColumn Header="小题数" Width="*" Binding="{Binding smallquestion_count}"/>
                    <DataGridTemplateColumn Header="编辑试卷" Width="*">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Content="点击" Click="Button_Click" Tag="{Binding ex_id}"></Button>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
    </Grid>
</Page>
